package pe.edu.pucp.dp1.procesamiento.controlador;

public class HiloSimZona extends Thread {

    public static GestorInterseccion gestorInter = GestorInterseccion.getInstance();

    int iniX;
    int iniY;

    public void run() {

        while (true) {
            try {
                //System.out.println("Ejecucion HiloSimZona");
                Thread.sleep(1000);

                for (int i = 0; i < 4; i++) {
                    for (int j = 0; j < 4; j++) {
                        gestorInter.ActMatTotalIntSalida(this.iniX + i, this.iniY + j);
                    }
                }
            } catch (Exception e) {
            }
        }
    }

    public HiloSimZona(int iniX, int iniY) {
        this.iniX = iniX;
        this.iniY = iniY;
    }
}
